package org.sensation.server.file.transfer.dispachservice;

import java.io.IOException;
import java.nio.ByteBuffer;

import org.sensation.server.file.transfer.request.FileChannelRequest;

public class ReadService implements DispacheService {

	public void service(FileChannelRequest request) throws IOException {
		printBuffer(request.receive());
		request.close();
	}
	private void printBuffer(ByteBuffer readBuff) {
		byte[] array = readBuff.array();
		for (byte b : array) {
			System.out.print((char) b);
		}
	}
}
